#ifndef KETOGLABELICON_H_
#define KETOGLABELICON_H_

#include "../../../../kegui_global.h"

#include <QWidget>
#include <QPaintEvent>
#include <QFont>
#include <QPointF>

#include <QString>




class KEGUI_EXPORT KeTogLabelIcon : public QWidget
{
    Q_OBJECT
public:
  explicit KeTogLabelIcon(QWidget *parent,uint iconCode,const QString label);
    bool eventFilter(QObject *watched, QEvent *event) override;
    void setIconFont(const QFont &f);
protected:
    void leaveEvent(QEvent *) override;
    void enterEvent(QEnterEvent *event)override;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void paintEvent(QPaintEvent *) override;


private:

    bool isWindowDeactivate,m_isMouseOver,isMouseDown,m_isChecked;
    uint m_codeIcon;
    QString m_strLabel;
    QPointF ptDown;
    QFont fontIcon;

Q_SIGNALS:
    void toggled(int checked);
};



#endif // TOGBTNICON_H
